<form action="{'Product/insert'|U}" method="POST" name="Basic_addProductClass" onsubmit="return false">
<div class="table_autoshow" style="border-style:none!important;">
 <table cellspacing="0" cellpadding="0" width="100%">
    <tbody>
    <tr><th colspan="2">{$lang.basic_title}</th></tr>
    <tr>
      <td class="width20">{$lang.product_no}：</td>
      <td class="t_left"><input type="text"   name="product_no" value="{$max_no}" {$is_auto_no} >__*__
      </td>
    </tr>
    <tr>
      <td>{$lang.product_name}：</td>
      <td class="t_left"><input type="text" name="product_name" class="spc_input" >__*__
      </td>
    </tr>
    <tr>
      <td>{$lang.class_name}：</td>
      <td class="t_left">
      <input type="hidden" name="product_class_id" id="product_class_id" value="{$rs.product_class_id}"><input id="product_class_name" value="{$rs.class_name}" url="{'/AutoComplete/lastProductClass'|U}" jqac itemto="dialog-quickly_add" >__*__<span id="parent_info"></span>
      </td>
    </tr>
    {if C('PRODUCT_FACTORY')==1}     
    <tr>
      <td>{$lang.factory_name}：</td>
      <td class="t_left">
      <input type="hidden" name="factory_id" id="factory_id" value="{$fac_id}">
      {if $rs.factory_readonly}
      {$rs.factory_name}
      {else}
      <input id="factory_name" name="temp[factory_name]" value="{$rs.factory_name}" url="{'/AutoComplete/factory'|U}" jqac itemto="dialog-quickly_add">__*__
      {/if}
      </td>
    </tr>    
    {/if}
    {if C('PRODUCT_COLOR')==1}
    <tr>
      <td>{$lang.color_name}：</td>
      <td class="t_left">
      {checkbox table="color" key="id" field="color_name" name="color[]" where="to_hide=1"} 
      <span id="add_color"></span> 
      </td>
    </tr> 
    {/if}
    {if C('PRODUCT_SIZE')==1}
    <tr>
      <td>{$lang.size_name}：</td>
      <td class="t_left">
      {checkbox table="size" key="id" field="size_name" name="size[]" where="to_hide=1"} 
      <span id="add_size"></span>
       </td> 
      </tr>
    {/if}
   
    
    {if C("storage_format")>1}
	<tr>
	<td>{$lang.storage_1}：</td>
	<td class="t_left"><input name="capability" id="capability" type="text"  class="spc_input" onkeyup="sumBag(this)"/>__*__ 
	</td>
	</tr>
	{/if}
	{if C("storage_format")==3}
	<tr>
	<td>{$lang.dozen}：</td>
	<td class="t_left"><input name="dozen" id="dozen" type="text" class="spc_input" onkeyup="sumBag(this)"/>__*__
	</td>
	</tr>
	<tr>
	<td>{$lang.storage_2}：</td>
	<td class="t_left"><input type="text" name="p_s_3" id="p_s_3" value="" readonly class="readonly spc_input"></td>
	</tr> 
	{/if}
		<tr>
    		<th colspan="2">{$lang.add_moe}[<a href="javascript:;" onclick="$.quicklyMore(this)">{$lang.add_open}</a>]</th>
    	</tr>
    	</tbody></table>
    	
    	<table cellspacing="0" cellpadding="0" class="table_autoshow_hidden" align="center">
    	<tr>
      <td>{$lang.instock_price}：</td>
      <td class="t_left">
      <input type="text" name="instock_price" class="spc_input"></td>
    </tr>
    	<tr>
      		<td class="width20">{$lang.cube}：</td>
<td class="t_left">

{$lang.long}<input name="cube_long" id="cube_long" type="text" onkeyup="getToTtalCube(this);" class="spc_input" style="width:60px!important;"/>M *
{$lang.wide}<input name="cube_wide" id="cube_wide" type="text" onkeyup="getToTtalCube(this);" class="spc_input" style="width:60px!important;"/>M *
{$lang.high}<input name="cube_high" id="cube_high" type="text" onkeyup="getToTtalCube(this);" class="spc_input" style="width:60px!important;"/>M
=<input name="cube" id="cube" type="text" readonly  class="spc_input readonly" style="width:60px!important;"/>M3

</td>
</tr>
<tr>
<td>{$lang.weight}：</td>
<td class="t_left"><input name="weight" id="weight" type="text"  class="spc_input"/> KG
</td>
</tr> 
{if $smarty.const.LANG_SET=='fr'}
{assign var="properties_name" value="properties_name_fr"}
{assign var="pv_name" value="pv_name_fr"}
{else}
{assign var="properties_name" value="properties_name"}
{assign var="pv_name" value="pv_name"}
{/if}
    {foreach key=key item=item from=$properties}
    <input type="hidden" name="product_detail[{$key}][properties_id]" value="{$item.id}">
    <tr>
      <td>{$item.$properties_name}：</td>
      <td class="t_left">
      {if $item.properties_type==1}
      <input type="text" name="product_detail[{$key}][value]" class="spc_input">
      {elseif $item.properties_type==2}
      {select combobox="1" name="product_detail[`$key`][value]" table="properties_value" key="id" field=$pv_name where="id in(select properties_value_id from properties_info where properties_id=`$item.id`) and to_hide=1" empty=true}
      {elseif $item.properties_type==3}
      {checkbox name="product_detail[`$key`][value][]" table="properties_value" key="id" field=$pv_name where="id in(select properties_value_id from properties_info where properties_id=`$item.id`) and to_hide=1"}
      {/if}
      </td>
    </tr>
    {/foreach}
     <tr>
      <td valign="top">{$lang.comments}：</td>
      <td class="t_left"><textarea name="comments"></textarea>
      </td>
    </tr>
    </tbody>
  </table> 
  </div>
</form>
